package com.xmut.mapper;

import com.xmut.pojo.Sv;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SAMapper {
    @Insert("insert into tb_service(name, number, service, address, time) values (#{name},#{number},#{service},#{address},#{time})")
    void insert(Sv service);

    @Select("select * from tb_service ")
    List<Sv> getAll();

    @Delete("delete from tb_service where id = #{id}")
    void delServiceById(Integer id);
}
